<template>
    <div class="pre-bar-container">
        <div class="pre-bar-border" :style="{ 'background-color': items.colorBorder }"></div>
        <div class="pre-bar-title" :style="{ 'color': items.colorTitle, 'font-size': items.fontSize + 'px' }">
            {{ items.title }}
        </div>
    </div>
</template>

<script lang="ts" setup>
import { PropType } from 'vue';
defineProps({
    items: {
        type: Object as PropType<any>,
        default() {
            return {
                colorBorder: 'blue',
                colorTitle: 'black',
                title: '标题',
                fontSize: 15,
            };
        },
    },
});
</script>

<style lang="less" scoped>
.pre-bar-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    padding: 4px 0;
    flex-wrap: nowrap;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: none;

    .pre-bar-border {
        width: 5px;
        height: 25px;
        background-color: red;
        border-radius: 20px;
        flex-wrap: nowrap;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: none;

    }

    .pre-bar-title {
        font-size: 15px;
        font-weight: 600;
        padding-left: 7px;
        flex-wrap: nowrap;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: none;
    }
}
</style>

